<template>
  <div class="mine-footer">
    <div class="loginOut">
      <b>{{username}}</b><em>|</em><span @click="loginOut">退出</span>
    </div>
    <div class="version">
      <p>百丽国际旗下购物网站</p>
      <p>Copyright © 2011-2018 优购 m.yougou.com</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: localStorage.getItem("token")
    };
  },
  methods: {
    loginOut() {
      localStorage.removeItem("token");
      localStorage.removeItem("uid");
      localStorage.removeItem("sex");
      localStorage.removeItem("birth");
      localStorage.removeItem("addr");
      this.$router.push("/login");
    }
  }
};
</script>

<style lang="scss" scoped>
.mine-footer {
  background-color: #eee;
  position: fixed;
  bottom: 0;
  width: 100%;
  .loginOut {
    padding: 0 15px;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
    color: #666;
    b {
      font-weight: normal;
      height: 30px;
      display: inline-block;
    }
    em {
      font-size: 16px;
      margin: 0 3px;
      color: #a0a0a0;
      font-style: normal;
    }
  }
  .version {
    padding-top: 5px;
    p {
      color: #a0a0a0;
      font-size: 12px;
      text-align: center;
      background-color: #eee;
      &:first-child {
        margin-bottom: 3px;
      }
    }
  }
}
</style>